﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Antlr.Runtime.Tree;

namespace King.Language {

    public static class Extensions {

        public static IEnumerable<CommonTree> GetChildren(this CommonTree tree) {

            if (tree.Children == null)
                return Enumerable.Empty<CommonTree>();

            return tree.Children.Cast<CommonTree>();
        }
    }
}
